package com.wcs.exam.common.enums;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public enum EvaluationMethodEnum {
    /**
     * 自动评阅
     */
    AUTO(1, "自动评阅", ""),

    /**
     * 人工评阅
     */
    ARTIFICIAL(2, "人工评阅", "");

    /**
     * 编码
     */
    private final Integer code;

    /**
     * 描述
     */
    private final String desc;

    /**
     * 描述
     */
    private final String descEn;

    public static EvaluationMethodEnum byCode(Integer code) {
        if (code == null) {
            return null;
        }
        for (EvaluationMethodEnum methodEnum : EvaluationMethodEnum.values()) {
            if (methodEnum.getCode().equals(code)) {
                return methodEnum;
            }
        }
        return null;
    }
}
